<!DOCTYPE html>
<html lang="en">
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <h2 th:text="${msg}"></h2>
    <h2 th:text="${msg}"></h2>
    <form action="/fileupload" method="post" enctype="multipart/form-data">
        <input type="file" name="file" />
        <input type="submit" value="提交" />
    </form>
    <h3><a href="/download/100">下载文件</a></h3>
    <button id="test">测试</button>
    <script type="text/javascript" src="/js/jquery-3.3.1.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#test").on("click", function () {
                $.ajax({
                    "url" : "http://localhost:8080/testUser",
                    "type" : "get",
                    "dataType" : "json",
                    "success" : function (data) {
                        console.log(data);
                    }
                });
            });
        });
    </script>
</body>
</html>